﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            EoL5();
        }
        static void EoL1()
        {
            Random a = new Random();
            double b = a.Next(5) + a.NextDouble();
            string c = b.ToString("f2");
            Console.WriteLine(c);
        }
        static void EoL2()
        {
            Random a = new Random();
            double b = a.Next(4,7) + a.NextDouble();
            string c = b.ToString("f2");
            Console.WriteLine(c);
        }
        static void EoL3()
        {
            Random a = new Random();
            int[] b = new int[10];
            for (int i = 0; i < b.Length; i++)
            {
                int c = a.Next(10) + 1;
                b[i] = c;
                for (int j = 0; j < i; j++)
                {
                    if (b[i]==b[j])
                    {
                        i = i - 1;
                    }
                }
            }
                for (int i = 0; i < b.Length; i++)
            {
                Console.Write(b[i]+" ");
            }
        }
        static void EoL4()
        {
            Console.WriteLine("请输入邮箱");
            string a = Console.ReadLine();
            bool result = Regex.IsMatch(a, @"^[^.]{1}[\S]{1,}@(\S){1,}(com|org|net|edu|mil|tv|biz|info)$");
            Console.WriteLine(result);
        }
        static void EoL5()
        {
            Console.WriteLine("输入手机号码");
            string a = Console.ReadLine();
            bool result = Regex.IsMatch(a, @"^(\+86)?((13)[\d]{9}|(14)(5|7)[\d]{8}|(15)([0-3|5-9])[\d]{8}|(17)(6|7|8)[\d]{8}|(18)[\d]{9})$");
            Console.WriteLine(result);
        }
    }
}
